import axios from 'axios'

// const _products = [
//   {"id": 1, "title": "iPad 4 Mini", "price": 500.01, "inventory": 2},
//   {"id": 2, "title": "H&M T-Shirt White", "price": 10.99, "inventory": 10},
//   {"id": 3, "title": "Charli XCX - Sucker CD", "price": 19.99, "inventory": 5}
// ]

export default {
  getSeller(sellId, cb) {
    axios.get('/api/seller?sellerid=' + sellId)
      .then((response) => {
        if (response && response.data.errno === 0) {
          const reData = response.data.data
          reData.id = sellId
          cb(reData)
        }
      })
      .catch((error) => {
        console.log(error);
      });
  },
}
